{% extends "base.html" %}
{% block content %}
            <div id="topic">
                {% if is_admin %}
                <a href="/admintopic?topic={{topic.key}}">Topic Admin</a><p>
                {% endif %}
                <h3>Join the discussion</h3>
                    <span class="discussion-title">
                    {% if discussion %}
                        Discussion: <a href="/discussion?type={{ discussion.type }}">{{ discussion.type }}</a> / <a href="/discussiontopics?discussion={{ discussion.key }}">{{ discussion.title }} </a>
                    {% endif %}
                    {% if article %}
                        Article: <a href="/articletopics?article={{ article.key }}">{{ article.title }} </a>
                    {% endif %}
                    {% if document %}
                        Document: <a href="/document?document={{ document.key }}">{{ document.title }} </a>
                    {% endif %}
                    </span>
                    <p>
                <div id="original-post">
                    <span class="original-post-title">{{ topic.title }}</span>
                    <div class="comment-message">{{ topic.message }}</div>
                    <div class="comment-signature">
                        {{ topic.nickname }}
                        <span class="noIE">&nbsp;</span><br />
                        {{ topic.createdate|date:"F jS, Y P T" }}<br/>
                        <span class="reply-stats">There are {{ topic.commentcount }} replies to this post.</span>
                    </div>
                    <br/>
                </div>
                {% if not nickname %}
                    <p>You must be <a href="{{ loginurl }}">logged in</a> as a <a href="/register">member</a> to add a new reply.</p>
                {% else %}
                    <div class="post-link"><a href="/postcomment?topic={{ topic.key }}">Reply to this post</a></div>
                    <p></p>
                {% endif %}
                {% for comment in comments %}
                    <div class="post-reply">
                        <div class="comment-message">{{ comment.message }}</div>
                        <div class="comment-signature">
                            {{ comment.nickname }}
                            <span class="noIE">&nbsp;</span><br />
                            {{ comment.date|date:"F jS, Y P T" }}
                        </div><p>
                    </div>
                {% endfor %}                
            </div>
{% endblock %}